<!DOCTYPE html>
<html>
<head>
    <title>打印</title>
    <meta charset="utf-8">
    <!-- 打印的样式-->
    <style media="print">
        @page {

        }
    </style>
    <script src="js/jquery.min.js"></script>
    <script src="js/main.js"></script>
    <script src="/dist_JsBarcode.all.min.js"></script>
    <script language="javascript" src="../prints/Lodop6.161/LodopFuncs.js"></script>
    <link rel="stylesheet" href="042210010592_files/style.css">
    <link rel="stylesheet" href="css/style.css">
    <script>
        function batchPrint() {
            showPrint();
        }

        function current() {
            var d = new Date(),
                str = '';
            str += d.getFullYear() + '-'; //获取当前年份
            str += d.getMonth() + 1 + '-'; //获取当前月份（0——11）
            str += d.getDate() + ' ';

            return str;
        }

        function currenttime() {
            var d = new Date(),
                str = '';
            str += d.getHours() + ':';
            str += d.getMinutes() + ':';
            str += d.getSeconds();
            return str;
        }
    </script>
</head>

<body>
<div class="main">
    <div class="header">
        <div class="headerL">
            <img src="images/u7.png">
            <div class="name">
                <p class="name1">
                    山东大学附属儿童医院
                </p>
                <p class="des">
                    Childern’s Hospital Affiliated to Shandong Universitry
                </p>
            </div>
        </div>
        <div class="headerR">
            <span id="kyear"></span>
            <span id="ktime"></span>
        </div>
    </div>
    <div class="con">
        <div class="title">
            <a class="goBack">返回</a>
            <span id="timeOut"></span>
        </div>
        <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width="0" height="0">
            <embed id="LODOP_EM" type="application/x-print-lodop" width="0" height="0"
                   pluginspage="./Lodop6.161/install_lodop32.exe"></embed>
        </object>
        <div style="margin-left: 120px;" id="tableData">
            <!--startprint-->
            <div style="font-size: 12pt">
            <div style="width:1007px;margin-left:15%;font-size:20pt;font-weight:900;margin-top:50px;">山东大学附属儿童医院&nbsp;&nbsp;&nbsp;&nbsp;济南市儿童医院</div>
            <div><span style="font-size:20pt;font-weight:900;margin-left:35%;margin-top:7px;"> 检&nbsp;验&nbsp;报&nbsp;告&nbsp;单</span><span
                    style="float:right;font-size:13pt;font-weight:bold;margin-top:10px;"> 全省参考</span></div>
            <div style="margin-top:43px;font-size: 12pt"><span> 姓名:</span><span id="baogaoName"></span><span
                    style="margin-left:50px;"> 性别:</span><span id="baogaoSex"></span><span style="margin-left:49px;"> 年龄:</span><span  id="baogaoAge"></span><span
                    style="margin-left:52px;"> 标本类型:</span>
                <span>咽拭子</span><span style="margin-left:50px;"> 身份证号:</span><span  id="baogaoIdcard"></span></div>
            <div style="border-bottom: #000000 1px solid;width: 100%;height: 9px;margin-top:-3pt;"></div>
            <div style="margin-top:12px;display:inline-block;width:1007px;font-weight: bold;"><span> 序</span><span
                    style="margin-left:7%">代号</span><span style="margin-left:8%"> 项目名称</span>
                <span style="margin-left:11%">结果</span><span style="margin-left:11%">
			参考范围</span><span style="margin-left:9%">单位</span></div>
            <div style="border-bottom: #000000 1px solid;width: 100%;height: 9px;margin-top:-5pt;"></div>
            <div style="height:180px;">
                <div style="margin-top:15px;display:inline-block;width:1007px;"><span> 1</span><span
                        style="margin-left:6%">2019-nCov</span><span style="margin-left:4%" id="baogaoProject"> </span>
                    <span style="margin-left:4%" id="baogaoResult"></span><span style="margin-left:12%">
			阴性</span><span style="margin-left:10%"></span></div>
            </div>
            <div style="border-bottom: #000000 1px solid;width: 100%;height: 14px;"></div>
            <div style="margin-top:15px;"><span class="stl_26 stl_08 stl_29" style="word-spacing:0.3692em;">接收时间：</span><span id="baogaoSignDate"> &nbsp;</span>&nbsp;&nbsp;&nbsp;&nbsp;<span>报告时间：</span><span id="baogaoSignDate2"> &nbsp;</span>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>检验者：张豪正&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;审核者: 刘毅</span>
            </div>

            <div style="margin-top:15px;"><span>本检测报告可能受到采样时间、采样部位及方法学局限性等因素的影响，结果需结合临床进行分析。</span> </div>
                <div style="margin-top:15px;"><span>本报告仅对本次检测标本负责。 &nbsp;</span></div>

            </div>
            <!--endprint-->
        </div>
        <div style="margin-top: 50px;text-align: center;">
            <div style="width: 150px;margin-left: 45%;">
                <a><p class="baogaobtn" onclick='batchPrint()'>打印</p></a>
            </div>
        </div>
    </div>
    <div class="footer">
        <img src="images/u29.svg">
        0531-87964999
    </div>
</div>


</body>

<script type="text/javascript">
    var fapiaoInfo;
    $(function () {
        daojishi()
        fapiaoInfo = JSON.parse(localStorage.getItem('baogaoDataInfo'));
        $("#baogaoName").html(fapiaoInfo.name)
        $("#baogaoSex").html(fapiaoInfo.sex)
        $("#baogaoAge").html(fapiaoInfo.age)
        $("#baogaoIdcard").html(fapiaoInfo.idcard)
        $("#baogaoName").html(fapiaoInfo.name)
        $("#baogaoSignDate").html(fapiaoInfo.createTime)
        $("#baogaoSignDate2").html(fapiaoInfo.resultDate)
        $("#baogaoProject").html(fapiaoInfo.reportProject)
        $("#baogaoResult").html(fapiaoInfo.reportResult)
    })


    var LODOP; //声明为全局变量

    function CreatePage() {
        var strBodyStyle = "<style> </style>";
        var strStyleCSS = "";
        var tabledataheml = document.getElementById("tableData").innerHTML;
        var strDataHtml = strStyleCSS + strBodyStyle + "<body style='margin-left:10%;font-size：100%'>" + tabledataheml + "</body>";
        console.log(strDataHtml);
        //LODOP.ADD_PRINT_TABLE("2%","1%","96%","98%",strDataHtml);
        //LODOP.ADD_PRINT_HTM("2%","1%","96%","98%",strDataHtml);
        LODOP.ADD_PRINT_HTML("1", "0", "96%", "99%", strDataHtml);
        LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Auto-Width");
        //LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
        //LODOP.SET_PRINT_MODE("FULL_HEIGHT_FOR_OVERFLOW",true);

    }

    function showPrint() {
        LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
        LODOP.PRINT_INIT("打印报告");
        LODOP.SET_PRINT_STYLE("FontSize",18);
        //LODOP.SET_PRINTER_INDEX("HP LaserJet Pro M402-M403 PCL 6");//指定某虚拟打印机"DASCOM DT-330");
        CreatePage();
        //LODOP.PREVIEW();	//打印预览
        LODOP.PRINT();	//直接打印
        window.location.href = "pringBaoGaoIng.html"

    }

    function print_page() {
        if (!!window.ActiveXObject || "ActiveXObject" in window) { //是否ie
            remove_ie_header_and_footer();
        }
        bdhtml = window.document.body.innerHTML;
        var oldstr = document.body.innerHTML;
        sprnstr = "<!--startprint-->";
        eprnstr = "<!--endprint-->";
        prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
        prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
        window.document.body.innerHTML = prnhtml;
        console.log(prnhtml);
        window.print();
        document.body.innerHTML = oldstr;

    }

    function remove_ie_header_and_footer() {
        var hkey_path;
        hkey_path = "HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
        try {
            var RegWsh = new ActiveXObject("WScript.Shell");
            RegWsh.RegWrite(hkey_path + "header", "");
            RegWsh.RegWrite(hkey_path + "footer", "");
        } catch (e) {
        }
    }

    /* print_page()*/
</script>
</html>
